
<template>
  <div>
    <div style="display: flex; align-items: center; padding: 10px; color: #fff">
      <span style="margin-right: 20px; font-weight: bold"
        >森林火险气象感知预报</span
      >
      <span style="margin-right: 20px">|</span>
      <span style="display: flex; align-items: center">
        <span>10天预报</span>
      </span>
    </div>
    <div>
        <el-table
        :data="groupData"
        style="width: 100%"
        stripe
        :header-cell-style="headerCellStyle"
        :cell-style="cellStyle"
        :row-style="rowStyle"
      >
        <el-table-column
          prop="instalMent"
          label="发布单位"
          fixed="left"
          min-width="25%"
        ></el-table-column>
        <el-table-column
          prop="productName"
          label="产品名称"
          min-width="25%"
        ></el-table-column>
        <el-table-column prop="unit" label="产品期数" min-width="25%">
        </el-table-column>
        <el-table-column prop="time" label="产品发布时间" min-width="25%">
        </el-table-column>
        <el-table-column prop="filename" label="文件名" min-width="25%">
        </el-table-column>
        <el-table-column prop="operate" label="文件操作" min-width="30%">
          <template v-slot="scope">
            <el-button
              @click="getUrl(scope.row.filename)"
              type="info"
              size="small"
              style="margin-left: 10px"
              >查看</el-button
            >
            <el-button
              type="primary"
              size="small"
              @click="download(scope.row.filename)"
              >下载</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      </div>
  </div>
</template>
  
  <script>
export default {
  data() {
    return {
      groupData: [{
        instalMent: "雅安市气象台",
        productName: "森林火险预报(十天)",
        unit: "2024年0152期",
        time: "2022-03-01 08:00",
        filename: "中国森林火险气象感知预报.pdf",
      },
      {
        instalMent: "雅安市气象台",
        productName: "森林火险预报(十天)",
        unit: "2024年0152期",
        time: "2022-03-01 08:00",
        filename: "中国森林火险气象感知预报.pdf",
      },
      {
        instalMent: "雅安市气象台",
        productName: "森林火险预报(十天)",
        unit: "2024年0152期",
        time: "2022-03-01 08:00",
        filename: "中国森林火险气象感知预报.pdf",
      }
      ],
    };
  },
  methods: {
    headerCellStyle() {
      return {
        background: "#0c2340",
        color: "#fff",
      };
    },
    cellStyle() {
      return {
        background: "#05152e",
        color: "#fff",
      };
    },
    rowStyle() {
      return {
        height: "30px",
      };
    },
  },
};
</script>
  
  <style scoped>
</style>
  